Skip to content

Probe all config-derived secrets for set/unset in the support bundle#739

Open
ak684 wants to merge 2 commits into
mainfrom
alona/support-bundle-secret-presence
Open

Probe all config-derived secrets for set/unset in the support bundle#739
ak684 wants to merge 2 commits into
mainfrom
alona/support-bundle-secret-presence

Conversation

@ak684

@ak684 ak684 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What

Make the support bundle report which configured secrets are set — without ever capturing a value.

Before, the bundle had 5 secret collectors (postgres-password, redis, sandbox-api-key, github-app, keycloak-realm), two of which only checked the secret existed — not which keys inside it were populated. So for a customer using an integration, we couldn't tell from the bundle whether a given credential was actually set.

This adds per-key secret + includeValue: false probes (via a Helm dict/range loop) for the admin-configured / optional secrets — 60 probes total.

Why it's a yes/no without leaking anything

Every config-derived secret key is rendered only when its KOTS value is set ({{- if .Values.config.X }} in charts/openhands-secrets/templates/*). So with includeValue: false, the collector records secretExists / keyExists (booleans) and never the valuekeyExists == true ⇔ that credential was configured.

A future bundle will contain e.g. secrets/openhands/bitbucket-data-center-app/bot-token.json{"secretExists":true,"keyExists":false,...} — the exact signal we were missing while debugging a recent BBDC upgrade (we couldn't tell whether the bot token had been set).

Scope

Covers secrets whose set/unset reflects an admin choice, so the yes/no is meaningful:

  • Integration / auth: bitbucket-dc (incl. bot-token), jira-dc, azure-devops, gitlab, slack, github, keycloak-realm SMTP
  • LLM: per-provider keys in litellm-env-secrets (shows which provider is configured) + openhands-env-secrets
  • Storage / TLS: S3 creds, BYO TLS cert (openhands-tls)
  • Baseline infra (kept): postgres / redis / sandbox-api-key

Intentionally omits the always-generated internal secrets (jwt, admin/keycloak-admin passwords, automation-*, plugin-directory, default-api-key, lite-llm-api-key, and the now-defaulted UI_PASSWORD/LITELLM_SALT_KEY) — they'd read set unconditionally and add no signal.

Relationship to #727

Complements (doesn't duplicate) the openhands-config-snapshot env collector from #727. That one execs into the running openhands pod and reports set/unset for a curated SECRET_PRESENCE env list. This PR instead queries the k8s Secret objects directly, which:

  1. works when the app pod is down/crashing — exactly when an upgrade-failure bundle gets collected (a pod exec can't run then);
  2. covers keys not surfaced as env vars in that pod, and gives per-LLM-provider granularity.

Validation

  • Renders cleanly via helm template (valid YAML, deterministic alphabetical order).
  • Verified all 60 collectors are includeValue: false, zero includeValue: true, zero value: fields — no secret material can land in a bundle.
  • Bumped charts/openhands 0.7.64 → 0.7.66 (0.7.65 is already a release tag) for the chart-template-version-bump check. No Chart.lock / replicated/ pin churn.

Replace the 5 hand-written secret collectors with a loop over every secret the
chart creates, emitting one includeValue:false probe per key (77 total). Each
key renders only when its KOTS value is set, so keyExists reports set/unset
without capturing the value -- so a bundle now shows which credentials (e.g. the
BBDC bot-token) are configured. Bump chart to 0.7.66.
@ak684 ak684 requested a review from all-hands-bot June 19, 2026 18:39

Copy link
Copy Markdown
Contributor

🔍 Review in progress…

We are performing the review through OpenHands Cloud Automation. You can log in and view the conversation here.

Drop the always-generated internal secrets (jwt, admin/keycloak passwords,
automation-*, plugin-directory, etc.) that always read "set" and add no signal,
plus UI_PASSWORD/LITELLM_SALT_KEY which now default. Keeps integration/auth/LLM
provider/storage/BYO-TLS creds and the baseline infra probes: 60 probes, still
all includeValue:false. Complements #727's env snapshot but works via the k8s
API even when the app pod is down.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants